package com.service.impl;

import com.mapper.ApplyMasterMapper;
import com.pojo.ApplyMaster;
import com.service.ApplyMasterService;
import com.util.Pager;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

@Service("applyMasterService")
public class ApplyMasterServiceImpl implements ApplyMasterService {
    @Resource
    private ApplyMasterMapper applyMasterMapper;
    @Override
    public Pager<ApplyMaster> searchByPagerApplyMaster(Pager<ApplyMaster> pager) {
        pager.setRows(applyMasterMapper.searchPagerByApplyMaster(pager));
        pager.setTotal(applyMasterMapper.total(pager));
        return pager;
    }

    @Override
    public int TiJiao(String applyMasterNo) {
        return applyMasterMapper.TiJiao(applyMasterNo);
    }

    @Override
    public int add(ApplyMaster applyMaster) {
        return applyMasterMapper.add(applyMaster);
    }

    @Override
    public ApplyMaster getLast() {
        return applyMasterMapper.getLast();
    }
}
